Skip to content

Re-enable commandcode on the provider-availability system (opencode#1828) - #6503

Merged
dezren39 merged 1 commit into
mainfrom
feat/commandcode-reenable
Nov 6, 2026
Merged

dezren39 merged 1 commit into
mainfrom
feat/commandcode-reenable

Conversation

@dezren39

@dezren39 dezren39 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Re-enables commandcode (removes it from disabled_providers; definition and all seats untouched, per the switchboard rule) and pins the opencode fork to aba451ef, which carries the provider-availability system.

Why it was disabled, and what changed

The 2026-10-31 note names two blockers: credits exhausted (~$0.10 left), and a router that kept retry-looping its leaves (deepseek-flash-plan, spark-plan, sol-plan, beam-plan, mimo-flash-plan, scout) on "insufficient credits".

The router half is fixed by the provider-availability system — design + results: opencode#1828, implementation: opencode PR #1832 (merged 6b178f66, in this pin):

  • An exhausted-balance/quota failure benches the provider on its first failure and stops all further attempts until the quota feed shows a measured increase (or the stated reset passes).
  • The route-stats tool now reports every stop in force with its class (quota / balance / rate-limit / auth / unknown / infra / slow), resume rule, and until.

With that in place, an empty balance is no longer a reason to unseat the provider: it sits seated, stopped, visible — and rejoins on refill with no config change. Seats are never removed/re-added around quota walls; availability is routing-layer state.

Acceptance evidence (both legs required by #1828)

  1. Harness tests ✅ — new model-route-availability.test.ts (12 scenarios): the seamlessness property (a permanently erroring pool member receives exactly one attempt across five sessions, all served by its sibling; a quota-walled member is never re-attempted while stopped and serves again after a measured increase); classification parity (Antigravity's text wall ≡ Mistral's tagged quota); retry-after honored; unknown-error escalation; infra holds leave error standing untouched. Full @opencode/core suite: 1414 pass / 0 fail; tsc clean.
  2. Driven live session ✅ — a scratch server built from the merged fork (isolated data/config/state, production untouched) ran a route livetest = ordered [deadleaf (local mock, always HTTP 500), goodleaf (local mock, canned SSE success)]. Three sessions driven over the HTTP API: all 3 succeeded via goodleaf. route_attempt shows the dead leaf attempted only in session 1's opening race (title generation + first prompt landing before the first failure was recorded), then zero attempts in sessions 2–3; route_health records its cooldown-start bench; one attempt row records failed_over_to = goodleaf/good-model.

Activation

Both halves land together at the next switch: this config flip + the fork pin carrying the availability system.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • New Features
    • The CommandCode provider is now available for use. Its existing configuration remains unchanged, and other provider availability is unaffected. This gives you another provider option without changing how the provider itself is configured.

…stem (opencode#1828)

Removes commandcode from disabled_providers (definition and seats untouched) and pins the opencode fork to aba451ef, which carries the availability state machine (fork PR #1832). An exhausted or erroring provider now benches on first failure and costs sessions nothing while stopped; it rejoins automatically on a measured quota increase. Evidence on opencode#1828: harness seamlessness scenarios + a driven live session (3/3 sessions succeeded via the sibling; the permanently-500 leaf took zero attempts after its first bench).
@dezren39
dezren39 requested a review from a team as a code owner November 6, 2026 10:59
@dezren39
dezren39 merged commit e4742dc into main Nov 6, 2026
@dezren39
dezren39 deleted the feat/commandcode-reenable branch November 6, 2026 10:59
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The configuration removes commandcode from disabled_providers. deepseek remains disabled. Comments describe provider availability behavior for quota or balance failures.

Changes: Provider configuration

Layer / File(s) Summary
Provider availability configuration
.opencode/opencode.jsonc
The disabled provider list no longer includes commandcode; deepseek remains listed. Comments describe how quota or balance failures affect provider availability.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Merge Risk: Moderate · up to 2e03a

Commandcode can remain unavailable after a refill, while exhausted seats can still be selected when all alternatives are unavailable. Resolve these availability gaps before merging, or explicitly accept the bounded failures.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T11:00:20.119564Z 2e03a7d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39

dezren39 commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

Correction to the test figures in the results above

The "1414 pass / 0 fail" full-suite figure quoted in my results comment (and in PR #1832 / code PR #6503) came from a background tool delivery that proved unreliable on re-check, so I re-ran the full @opencode/core suite detached, writing to a log file read back directly. The true figures:

Full suite on the merged branch: 8206 pass / 15 skip / 11 fail (8232 tests, 343 files). All 11 failures are accounted for and none is a regression from this change:

  • DatabaseMigration > declared schema has no ungenerated migrations — fails identically on pristine origin/main (verified in a clean worktree).
  • Core test environment > isolates global home and XDG roots — fails identically on pristine origin/main.
  • native in-process embeddings backend ×4 — fail identically on pristine origin/main (the parity backend isn't available in this environment).
  • Session.shell ×5 — 30s timeouts under the loaded full-suite run; the same file passes 9/9 in isolation on both pristine main and this branch.

Everything that exercises the changed code was verified in foreground runs: availability + mock-provider 34 pass / 1 pre-existing skip; the model-route family 409 pass; resolver/title/tuning/persona 127 pass; session runner + step 298 pass (the 3 initial failureHint shape failures were fixed by omitting unset hint fields, per the codebase convention); tsc --noEmit clean. The live-session evidence stands as reported (it was read from the scratch server's own route_attempt / route_health tables and the mock leaves' counters, not from tool narration).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant